<?php

/**
 * @name: HOTN AnimeList
 * @author: HammerOnTheNail
 * @link: http://code.google.com/p/hotnanimelist/
 */

// Admin oldal címének meghatározása
$title .= " \ ".HOTN_ANIMELIST_ADMIN_MENU_FILE_DELETE;
$text = "";

if ($_POST['action'] == "delete")
{	
	$HOTN_ANIMELIST_DOWNLOAD->hotn_animelist_download_delete_file($_POST['download_id'],$_POST['delete_file']);
	
	$ns -> tablerender(HOTN_ANIMELIST_ADMIN_DEFAULT_ERROR_TITLE, HOTN_ANIMELIST_ADMIN_FILE_DELETE);
}

$data = array(
	"type" => "form",
	"method" => "post",
	"action" =>  e_SELF."?file.delete",
	"hidden" => array("action" => "delete"),
	"data" => array(
				array(
					"type" => "select",
					"name" => "download_id",
					"group" => "true",
					"value" => $HOTN_ANIMELIST_DOWNLOAD->hotn_animelist_download_get_all(),
					"text" => HOTN_ANIMELIST_ADMIN_FILE_DOWNLOAD_NAME
				),
				array(
					"type" => "checkbox",
					"name" => "delete_file",
					"text" => HOTN_ANIMELIST_ADMIN_FILE_DELETE_CHECKBOX_DELETE,
					"row" => 3,
					"value" => array("true" => "")
				),
				array(
					"type" => "submit",
					"value" => HOTN_ANIMELIST_DEFAULT_FORM_DELETE
				)
	)
);

// Admin oldal tartalmának megjelenítése
$text .= "<div style='text-align: center;'>".$HOTN_ANIMELIST_FORM->show_form($data)."</div>";
?>